package test3_12;

import java.util.Arrays;

public class Test_bubbling {
    public static void main(String[] args) {
        int[] arr = {2, 5, 3, 8, 1, 0, 6};
        for (int i = 0; i < arr.length-1; i++) {
            for (int j = 0; j < arr.length-i-1; j++) {
                if (arr[j+1] < arr[j]) {
                    int tmp = arr[j];
                    arr[j] = arr[j+1];
                    arr[j+1] = tmp;
                }
            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
